﻿using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System;

namespace aspNetCURD.Models
{
    public class sc
    {
        /// <summary>
        /// 学号
        /// </summary>
        //public ICollection<Student> sno { get; set; }
        [Required(ErrorMessage = "学号不能为空")]
        [MaxLength(9, ErrorMessage = "主键最大长度为 9")]
        public string sno { get; set; }
        /// <summary>
        /// 课程号
        /// </summary>
        //public ICollection<course> cno { get; set; }
        [Required(ErrorMessage = "课程号不能为空")]
        [MaxLength(4, ErrorMessage = "课程号最大长度为 4")]
        public string cno { get; set; }
        /// <summary>
        /// 成绩
        /// </summary>
        public byte? score { get; set; }
    }
}
